# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgbase=python-libsigscan-python
pkgname=('python2-libsigscan-python' 'python-libsigscan-python')
_pkgname=libsigscan
__pkgname=libsigscan-python
pkgver=20240505
pkgrel=2
pkgdesc='Python bindings module for libsigscan.'
arch=('x86_64' 'aarch64')
url='https://pypi.python.org/pypi/libsigscan-python/'
license=('LGPL3')
makedepends=('python2-setuptools' 'python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('8525ca2a0c23475f1e9af70844959f73024fd74a68fdb1a531ac0603c1f1d527f2691a420edc75074a3939a2db22a2e5e3f4d636f9826c01593e80067df1522b')

prepare() {
  cp -a "$_pkgname-$pkgver"{,-2}
}

build() {
  cd "$_pkgname-$pkgver-2"

  python2 setup.py build

  cd "$srcdir/$_pkgname-$pkgver"

  python setup.py build
}

package_python2-libsigscan-python() {
  depends=('python2')

  cd "$_pkgname-$pkgver-2"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

package_python-libsigscan-python() {
  depends=('python')

  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

